﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DbSharp.SupportLib.Crypto;

namespace DbSharp.Framework.ReleaseManage
{
    public class SensitiveMessage
    {

        private static string Decrypt(string base64SecretMsg)
        {
            var crypto = new SymmetricCryptoService();

            string secretText = base64SecretMsg;
            string plainText = crypto.Decrypto(secretText);
            return plainText;
        }


        public static byte EqualMarkInUtf8
        {
            get { return 61; }
        }

        public static string MsgboxInfoTitle
        {
            get
            {
                //Info
                /*5NQ8xtowmfuqMKwdzbm2DQ==*/
                string secretText = "5NQ8xtowmfuqMKwdzbm2DQ";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte, equalMarkByte });
                return Decrypt(secretText);
            }
        }


        public static string SoftwareExpiredMsg1
        {
            get
            {
                //Trial period has expired.
                //lrgBFA7+YCk1wQDUlBx1m0JgD0Uv55AAxwNhWSm5Sj8=

                string secretText = "lrgBFA7+YCk1wQDUlBx1m0JgD0Uv55AAxwNhWSm5Sj8";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte });
                return Decrypt(secretText);
            }
        }


        public static string InvalidLicenseMsg
        {
            get
            {
                //License is invalid, please check the license.xml or contact the software vender.
                /*on4leisKpBvQfgAVXtepAaLmyCthm8E98GsJWnM/y232eSL81zWDkm2AMwZ+5Yuh9XDR5PdBJtthyq91sHTWGHImKO9Z7hXlyU1Z3vuQk8HpXyzb+ZDXm/3AjepfP3e9*/
                string secretText = "on4leisKpBvQfgAVXtepAaLmyCthm8E98GsJWnM/y232eSL81zWDkm2AMwZ+5Yuh9XDR5PdBJtthyq91sHTWGHImKO9Z7hXlyU1Z3vuQk8HpXyzb+ZDXm/3AjepfP3e9";
                //byte equalMarkByte = 61;
                //secretText = secretText;
                return Decrypt(secretText);
            }
        }

 
        public static string BadConfigFileMsg
        {
            get
            {
                //Application configuration file has beed destroied. Application will exit.
                /*iGgzANa6x9C4NhYzyTEVRbW5aw+Lg5V6AXYhdciOLO9frcfBEcz0FLTNCmEEoCL4WiT1iFLOFIO0x1mz9AA715QlmD3rJWC5qOIC6UIr7D4=*/
                string secretText = "iGgzANa6x9C4NhYzyTEVRbW5aw+Lg5V6AXYhdciOLO9frcfBEcz0FLTNCmEEoCL4WiT1iFLOFIO0x1mz9AA715QlmD3rJWC5qOIC6UIr7D4";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte });
                return Decrypt(secretText);
            }
        }

        public static string SandboxNotSupportedMsg
        {
            get
            {
                //Feature testInSandbox is not supported in this edition.
                /*1jbGtKddamjae9PTe1f4J9azihZbZeqeNI7C+GJcZ/WD2ESwUhBhIeFHiWmvjPNmAUFzfFmX54SKV2Yzb52OaA==*/
                string secretText = "1jbGtKddamjae9PTe1f4J9azihZbZeqeNI7C+GJcZ/WD2ESwUhBhIeFHiWmvjPNmAUFzfFmX54SKV2Yzb52OaA";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte, equalMarkByte });
                return Decrypt(secretText);
            }
        }

        public static string UnitTestSetupNotSupportedMsg
        {
            get
            {
                //Feature setup and teardown for unit testing are not supported in this edition.
                /*0AYLFakN4ODfl7N+7tz0fh7GYGP+U3oBetM/BUZqOagSfYv5NDlTsP+GTs8lhwZ6p5PebFeh1VsbLijFKqBU/3+UTzwolWgq5eEpzWKvKWw=*/
                string secretText = "0AYLFakN4ODfl7N+7tz0fh7GYGP+U3oBetM/BUZqOagSfYv5NDlTsP+GTs8lhwZ6p5PebFeh1VsbLijFKqBU/3+UTzwolWgq5eEpzWKvKWw";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte });
                return Decrypt(secretText);
            }
        }


        public static string DbConnectionCountOverflowMsgFmt
        {
            get
            {
                //DbConnection count must not be greater than {0} in this edition.
                /*Me4blIv+T8vUkzvBwZiPBKvAW95dtiVqT8B4N8Xp8ZHL1bJHDTYPGk7NQXxLykzF+uJI9H0xyCGGYgYYM5caNlvSq0JpzXcOdSPq/Qvf/38=*/
                string secretText = "Me4blIv+T8vUkzvBwZiPBKvAW95dtiVqT8B4N8Xp8ZHL1bJHDTYPGk7NQXxLykzF+uJI9H0xyCGGYgYYM5caNlvSq0JpzXcOdSPq/Qvf/38";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte });
                return Decrypt(secretText);
            }
        }


        public static string SetDiffNotSupportedMsg
        {
            get
            {
                //Set operation diff is not supported in this edition.
                /*68rWmRHO6t4Y9WPN5g6PMTk/CuWkLAd5EIJw8HJom2p0axzjDnUCVw5X+deEhwou3Vjw/qhb+ZC/96E0veCQyg==*/
                string secretText = "68rWmRHO6t4Y9WPN5g6PMTk/CuWkLAd5EIJw8HJom2p0axzjDnUCVw5X+deEhwou3Vjw/qhb+ZC/96E0veCQyg";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte, equalMarkByte });
                return Decrypt(secretText);
            }
        }

 
        public static string CaseXmlFileErrorMsgFmt
        {
            get
            {
                //=====Xml file error: {0}
                /*F5iVetc8MD7PobLoTBasu40+EpLiL8hVabjuDQXr83Y=*/
                string secretText = "F5iVetc8MD7PobLoTBasu40+EpLiL8hVabjuDQXr83Y";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte });
                return Decrypt(secretText);
            }
        }

 
        public static string CaseXmlLoadMsgFmt
        {
            get
            {
                //====={0} of {1} PerfTest cases and {2} of {3} UnitTest cases loaded.
                /*JPnjfdMuIvHZJU0MuL3LgCo7ZGAc7Onx1PIlyKu8re3q4B0vlPf08maqUeQuR6vAepiB9xXT92fpDfcehbA2oG3MBcU2LcsdhTGnqD6Y6KQ=*/
                string secretText = "JPnjfdMuIvHZJU0MuL3LgCo7ZGAc7Onx1PIlyKu8re3q4B0vlPf08maqUeQuR6vAepiB9xXT92fpDfcehbA2oG3MBcU2LcsdhTGnqD6Y6KQ";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte });
                return Decrypt(secretText);
            }
        }

 
        public static string UnitCaseCountOverflowMsgFmt
        {
            get
            {
                //-----UnitCase count must not be greater than {0} in this edition.
                /*HcOkiX6vAU0V88n+qKcw01CkoxvHTEZCkk2R9h0Oz5Z5/ByI6BizY/5D6/ZVFuLtU5zqBy1KpU2uuirnQICbao7/P2Lob+kBiP0CVzFGHLM=*/
                string secretText = "HcOkiX6vAU0V88n+qKcw01CkoxvHTEZCkk2R9h0Oz5Z5/ByI6BizY/5D6/ZVFuLtU5zqBy1KpU2uuirnQICbao7/P2Lob+kBiP0CVzFGHLM";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte });
                return Decrypt(secretText);
            }
        }

 
        public static string PerfCaseCountOverflowMsgFmt
        {
            get
            {
                //-----PerfCase count must not be greater than {0} in this edition.
                /*/c/jT4zZ4GANX0qtBRvwC3vYXw04+s3KcUvc9UwY9qrbQCPDeYj+qo5Z4Fh2/Xy0KulmqBVQG7zzgrFXMHOWc6dNOAvbcwYnmwqzV9+8CdI=*/
                string secretText = "/c/jT4zZ4GANX0qtBRvwC3vYXw04+s3KcUvc9UwY9qrbQCPDeYj+qo5Z4Fh2/Xy0KulmqBVQG7zzgrFXMHOWc6dNOAvbcwYnmwqzV9+8CdI";
                byte equalMarkByte = 61;
                secretText = secretText + System.Text.Encoding.UTF8.GetString(new byte[] { equalMarkByte });
                return Decrypt(secretText);
            }
        }

 

 
    }
}
